// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc             (unknown)
// source: compiler.proto

package proto

import (
	context "context"
	grpc "google.golang.org/grpc"
	codes "google.golang.org/grpc/codes"
	status "google.golang.org/grpc/status"
)

// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7

const (
	CompilerService_Compile_FullMethodName = "/proto.CompilerService/Compile"
)

// CompilerServiceClient is the client API for CompilerService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type CompilerServiceClient interface {
	Compile(ctx context.Context, in *CompileRequest, opts ...grpc.CallOption) (*CompileResponse, error)
}

type compilerServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewCompilerServiceClient(cc grpc.ClientConnInterface) CompilerServiceClient {
	return &compilerServiceClient{cc}
}

func (c *compilerServiceClient) Compile(ctx context.Context, in *CompileRequest, opts ...grpc.CallOption) (*CompileResponse, error) {
	out := new(CompileResponse)
	err := c.cc.Invoke(ctx, CompilerService_Compile_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// CompilerServiceServer is the server API for CompilerService service.
// All implementations should embed UnimplementedCompilerServiceServer
// for forward compatibility
type CompilerServiceServer interface {
	Compile(context.Context, *CompileRequest) (*CompileResponse, error)
}

// UnimplementedCompilerServiceServer should be embedded to have forward compatible implementations.
type UnimplementedCompilerServiceServer struct {
}

func (UnimplementedCompilerServiceServer) Compile(context.Context, *CompileRequest) (*CompileResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Compile not implemented")
}

// UnsafeCompilerServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to CompilerServiceServer will
// result in compilation errors.
type UnsafeCompilerServiceServer interface {
	mustEmbedUnimplementedCompilerServiceServer()
}

func RegisterCompilerServiceServer(s grpc.ServiceRegistrar, srv CompilerServiceServer) {
	s.RegisterService(&CompilerService_ServiceDesc, srv)
}

func _CompilerService_Compile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(CompileRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(CompilerServiceServer).Compile(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: CompilerService_Compile_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(CompilerServiceServer).Compile(ctx, req.(*CompileRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// CompilerService_ServiceDesc is the grpc.ServiceDesc for CompilerService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var CompilerService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "proto.CompilerService",
	HandlerType: (*CompilerServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Compile",
			Handler:    _CompilerService_Compile_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "compiler.proto",
}
